{% extends "base_for_react.html" %}
{% load render_bundle from webpack_loader %}
{% load seahub_tags %}

{% block extra_style %}
{% render_bundle 'app' 'css' %}
{% endblock %}

{% block extra_script %}
<script type="text/javascript">
  Object.assign(app.pageOptions, {
    enableShareToDepartment: {% if enable_share_to_department %} true {% else %} false {% endif %},
    shareLinkExpireDaysDefault: {{ share_link_expire_days_default }},
    shareLinkExpireDaysMin: {{ share_link_expire_days_min }},
    shareLinkExpireDaysMax: {{ share_link_expire_days_max }},
    uploadLinkExpireDaysDefault: {{ upload_link_expire_days_default }},
    uploadLinkExpireDaysMin: {{ upload_link_expire_days_min }},
    uploadLinkExpireDaysMax: {{ upload_link_expire_days_max }}
  });
  {% if onlyoffice_desktop_editors_portal_login %}
  let params = {
    "displayName": "{{request.user.username|email2nickname|escapejs}}",
    "email": "{{request.user.username|escapejs}}",
    "domain": "{{service_url}}",
    "provider": "{{site_name}}"
  }
  window.AscDesktopEditor.execCommand('portal:login', JSON.stringify(params));
  {% endif %}
</script>
{% render_bundle 'app' 'js' %}
{% endblock %}
